package com.suny.sf_server.mapper;

import org.apache.ibatis.annotations.Mapper;
import com.suny.Fence.domain.Fence;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;

import org.apache.ibatis.annotations.Param;
import com.suny.Fence.vo.FenceVO;
import com.suny.Fence.dto.FenceQueryDTO;

import java.util.List;


/**
* @author sun
* @description 针对表【fence(围栏管理表)】的数据库操作Mapper
* @createDate 2024-12-27 10:45:10
* @Entity domain.Fence.suny.com.Fence
*/
@Mapper
public interface FenceMapper extends BaseMapper<Fence> {
    /**
     * 分页查询带关联信息的围栏列表
     */
    IPage<FenceVO> selectFenceVOPage(IPage<Fence> page);

    /**
     * 查询指定圈舍下的可用围栏列表
     */
    List<FenceVO> selectEnableFencesByPenId(@Param("penId") Integer penId);

    /**
     * 条件查询围栏列表
     */
    IPage<FenceVO> selectFenceVOPageByCondition(
        @Param("page") IPage<Fence> page, 
        @Param("query") FenceQueryDTO query
    );
}




